package com.util;

public class strXorUnit {
    public static void strXor(byte[] output, byte[] sourceA, byte[] sourceB, int len){
        if (output.length < len || sourceA.length < len || sourceB.length < len) {
            throw new IllegalArgumentException("Array lengths must be at least 'len'.");
        }

        for (int i = 0; i < len; i++) {
            output[i] = (byte) (sourceA[i] ^ sourceB[i]);
        }
    }
}
